{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=338
  Verdict: Accepted
}
uses 
	SysUtils, Math;
 
var
	i,ls:longint;
	s,t:string;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
ls:=length(s);
t:='';
for i:=ls downto 1 do
	t:=t+s[i];
write(strtoint(t));
end.